home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-01-24 | 8.2 KB | 440 lines | [TEXT/MPS ] |
- ;
- ; File: CommResources.a
- ;
- ; Contains: Communications Toolbox Resource Manager Interfaces.
- ;
- ; Version: Technology: System 7.5
- ; Package: Universal Interfaces 2.2 in “MPW” on ETO #20
- ;
- ; Copyright: © 1984-1995 by Apple Computer, Inc.
- ; All rights reserved.
- ;
- ; Bugs?: If you find a problem with this file, use the Apple Bug Reporter
- ; stack. Include the file and version information (from above)
- ; in the problem description and send to:
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
-
- IF &TYPE('__COMMRESOURCES__') = 'UNDEFINED' THEN
- __COMMRESOURCES__ SET 1
-
-
- IF &TYPE('__OSUTILS__') = 'UNDEFINED' THEN
- include 'OSUtils.a'
- ENDIF
- ; include 'Types.a' ;
- ; include 'ConditionalMacros.a' ;
- ; include 'MixedMode.a' ;
- ; include 'Memory.a' ;
-
- ; tool classes (also the tool file types)
- classCM EQU 'cbnd'
- classFT EQU 'fbnd'
- classTM EQU 'tbnd'
-
- ; version of the Comm Resource Manager
- curCRMVersion EQU 2
- ; constants general to the use of the Communications Resource Manager
- crmType EQU 9 ; queue type
- crmRecVersion EQU 1 ; version of queue structure
- ; error codes
- crmGenericError EQU -1
- crmNoErr EQU 0
-
- ; data structures general to the use of the Communications Resource Manager
- ; typedef OSErr CRMErr
- CRMRec RECORD 0
- qLink ds.l 1 ; offset: $0 (0) ;reserved
- qType ds.w 1 ; offset: $4 (4) ;queue type -- ORD(crmType) = 9
- crmVersion ds.w 1 ; offset: $6 (6) ;version of queue element data structure
- crmPrivate ds.l 1 ; offset: $8 (8) ;reserved
- crmReserved ds.w 1 ; offset: $C (12) ;reserved
- crmDeviceType ds.l 1 ; offset: $E (14) ;type of device, assigned by DTS
- crmDeviceID ds.l 1 ; offset: $12 (18) ;device ID; assigned when CRMInstall is called
- crmAttributes ds.l 1 ; offset: $16 (22) ;pointer to attribute block
- crmStatus ds.l 1 ; offset: $1A (26) ;status variable - device specific
- crmRefCon ds.l 1 ; offset: $1E (30) ;for device private use
- sizeof EQU * ; size: $22 (34)
- ENDR
-
- ; typedef struct CRMRec CRMRec
- ; typedef CRMRec *CRMRecPtr
- ;
- ; pascal CRMErr InitCRM(void)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _InitCRM
- move.w #$0501,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION InitCRM
- ENDIF
-
- ;
- ; pascal QHdrPtr CRMGetHeader(void)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CRMGetHeader
- move.w #$0502,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CRMGetHeader
- ENDIF
-
- ;
- ; pascal void CRMInstall(CRMRecPtr crmReqPtr)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CRMInstall
- move.w #$0503,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CRMInstall
- ENDIF
-
- ;
- ; pascal OSErr CRMRemove(CRMRecPtr crmReqPtr)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CRMRemove
- move.w #$0504,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CRMRemove
- ENDIF
-
- ;
- ; pascal CRMRecPtr CRMSearch(CRMRecPtr crmReqPtr)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CRMSearch
- move.w #$0505,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CRMSearch
- ENDIF
-
- ;
- ; pascal short CRMGetCRMVersion(void)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CRMGetCRMVersion
- move.w #$0506,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CRMGetCRMVersion
- ENDIF
-
- ;
- ; pascal Handle CRMGetResource(ResType theType, short theID)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CRMGetResource
- move.w #$0507,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CRMGetResource
- ENDIF
-
- ;
- ; pascal Handle CRMGet1Resource(ResType theType, short theID)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CRMGet1Resource
- move.w #$0508,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CRMGet1Resource
- ENDIF
-
- ;
- ; pascal Handle CRMGetIndResource(ResType theType, short index)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CRMGetIndResource
- move.w #$0509,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CRMGetIndResource
- ENDIF
-
- ;
- ; pascal Handle CRMGet1IndResource(ResType theType, short index)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CRMGet1IndResource
- move.w #$050A,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CRMGet1IndResource
- ENDIF
-
- ;
- ; pascal Handle CRMGetNamedResource(ResType theType, ConstStr255Param name)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CRMGetNamedResource
- move.w #$050B,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CRMGetNamedResource
- ENDIF
-
- ;
- ; pascal Handle CRMGet1NamedResource(ResType theType, ConstStr255Param name)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CRMGet1NamedResource
- move.w #$050C,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CRMGet1NamedResource
- ENDIF
-
- ;
- ; pascal void CRMReleaseResource(Handle theHandle)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CRMReleaseResource
- move.w #$050D,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CRMReleaseResource
- ENDIF
-
- ;
- ; pascal Handle CRMGetToolResource(short procID, ResType theType, short theID)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CRMGetToolResource
- move.w #$0523,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CRMGetToolResource
- ENDIF
-
- ;
- ; pascal Handle CRMGetToolNamedResource(short procID, ResType theType, ConstStr255Param name)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CRMGetToolNamedResource
- move.w #$0526,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CRMGetToolNamedResource
- ENDIF
-
- ;
- ; pascal void CRMReleaseToolResource(short procID, Handle theHandle)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CRMReleaseToolResource
- move.w #$0524,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CRMReleaseToolResource
- ENDIF
-
- ;
- ; pascal long CRMGetIndex(Handle theHandle)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CRMGetIndex
- move.w #$050E,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CRMGetIndex
- ENDIF
-
- ;
- ; pascal short CRMLocalToRealID(ResType bundleType, short toolID, ResType theType, short localID)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CRMLocalToRealID
- move.w #$050F,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CRMLocalToRealID
- ENDIF
-
- ;
- ; pascal short CRMRealToLocalID(ResType bundleType, short toolID, ResType theType, short realID)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CRMRealToLocalID
- move.w #$0510,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CRMRealToLocalID
- ENDIF
-
- ;
- ; pascal OSErr CRMGetIndToolName(OSType bundleType, short index, Str255 toolName)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CRMGetIndToolName
- move.w #$0511,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CRMGetIndToolName
- ENDIF
-
- ;
- ; pascal OSErr CRMFindCommunications(short *vRefNum, long *dirID)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CRMFindCommunications
- move.w #$051A,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CRMFindCommunications
- ENDIF
-
- ;
- ; pascal Boolean CRMIsDriverOpen(ConstStr255Param driverName)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CRMIsDriverOpen
- move.w #$0521,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CRMIsDriverOpen
- ENDIF
-
- ;
- ; pascal CRMErr CRMParseCAPSResource(Handle theHandle, ResType selector, unsigned long *value)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CRMParseCAPSResource
- move.w #$0525,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CRMParseCAPSResource
- ENDIF
-
- ;
- ; pascal OSErr CRMReserveRF(short refNum)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CRMReserveRF
- move.w #$0513,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CRMReserveRF
- ENDIF
-
- ;
- ; pascal OSErr CRMReleaseRF(short refNum)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CRMReleaseRF
- move.w #$0514,-(sp)
- dc.w $204F
- dc.w $A08B
- dc.w $544F
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CRMReleaseRF
- ENDIF
-
- ENDIF ; __COMMRESOURCES__
-